package com.chencs.app;

import com.alibaba.fastjson.JSON;
import com.chencs.utils.MobilePostUtil;
import com.chencs.vo.net.response.ResponseBase;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by fangzehua on 2017/9/22.
 */
@RestController
public class BaseController {


    public BaseController() {

        System.out.println("构思");
    }

    boolean isCheck = true;

    public String getRequestMapSingle(HttpServletRequest request) {


        if (isCheck) {
            if (MobilePostUtil.JudgeIsMoblie(request)) {
                ResponseBase response = new ResponseBase();
                response.setCode(AppCommon.ERROR);
                response.setMsg("非法請求");
                return JSON.toJSONString(response);
            }
        }
        return  "";
    }


}
